package com.hxk.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hxk.pojo.User;

@Controller
public class UserController {

	@RequestMapping("/showUsers")
	public String showUsers(Model model) {
		List<User> users = new ArrayList<User>();
		users.add(new User(1, "张三", 25));
		users.add(new User(2, "李四", 30));
		users.add(new User(3, "王五", 28));
		model.addAttribute("users", users);
		return "userlist";
	}
}
